package com.fourfinance.model.service;

import java.util.Date;
import java.util.List;
import java.util.Set;

import com.fourfinance.exception.LenderException;
import com.fourfinance.model.domain.Client;
import com.fourfinance.model.domain.Loan;

public interface ClientService {
	public Long add(Client client);
	public Client get(Long id);
	public List<Client> list();
	public void remove(Long id);
	public void remove(String email);
	public void removeAll();
	public Client getByEmail(String email);
	public Client getByFirstname(String firstName);
	public Loan applyLoan(Client client, String ipAddress, Long amount, Date term) throws LenderException;
	public Loan extendLoan(String referenceId) throws LenderException;
	public Set<Loan> listLoans(Client client);
}
